/**
 * Created by Dalyn on 2017/4/01.
 */
import Relay from "react-relay";

export default class ReplySuggestMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { saveReply }`;
    }

    getVariables() { 
        return {
            argsInput: {
              suggestId: this.props.suggestId,
              userName: this.props.userName,
              phone: this.props.phone,
              detail: this.props.detail,
              label: this.props.label,
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on saveReplyPayload {
            saveReply {
              value
              errorCode
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
              fragment on saveReplyPayload {
                    saveReply {
                      value
                      errorCode
                      }
                  }
            `]
        }];
    }

}
